var userData = _appConfigs.getUserData().userOrgs;
var communityName = userData.orgName;
//var roleData = _appRoles.;
//alert(roleData);
$('#unemployedCommunityGrid').datagrid({  
    	url:'collect/management/getUnemployedCommunityList',  
    	queryParams:{
    		communityName:communityName
	    },
        fit:true,
        fitColumns:true,
        singleSelect:true,
        
        columns:[[
                  {field:'communityName',title:'社区名称',width:100,rowspan:3,align:'center',hidden:true},
                  {field:'project',title:'项目',width:100,rowspan:3,align:'center'},
                  {title:'当年有就业愿望的登记失业人员',colspan:7,align:'center'}, 
                  {field:'yearRealize',title:'当年实现就业<br />人数',width:100,rowspan:3,align:'center'},    
                  {field:'employmentRate',title:'就业率',width:100,rowspan:3,align:'center'}] ,
                  [
                  {field:'unemployed',title:'小计',width:100,rowspan:2,align:'center'},
                  {field:'priorYear',title:'上年结转',width:100,rowspan:2,align:'center'},    
                  {title:'本年增加',colspan:2,align:'center'},
                  {title:'个人原因减少',colspan:3,align:'center'}],
                  [  
                  {field:'totalYear',title:'小计',width:100,align:'center'},    
                  {field:'totalMonth',title:'本月新增',width:100,align:'center'},
                  {field:'reduceSummary',title:'小计',width:100,align:'center'},    
                  {field:'objReason',title:'因客观原因',width:100,align:'center'},
                  {field:'giveupJob',title:'放弃求职',width:100,align:'center'}
                ]]
    	
    }); 

function bindData(rowData){
	communityName = rowData.communityName;	
	$('#joblessCommunityName').val(communityName);

    $('#unemployedCommunityGrid').datagrid({  
    	url:'collect/management/getUnemployedCommunityList',  
    	queryParams:{
    		communityName:communityName
	    },
        fit:true,
        fitColumns:true,
        singleSelect:true,
        
        columns:[[
                  {field:'communityName',title:'社区名称',width:100,rowspan:3,align:'center',hidden:true},
                  {field:'project',title:'项目',width:100,rowspan:3,align:'center'},
                  {title:'当年有就业愿望的登记失业人员',colspan:7,align:'center'}, 
                  {field:'yearRealize',title:'当年实现就业<br />人数',width:100,rowspan:3,align:'center'},    
                  {field:'employmentRate',title:'就业率',width:100,rowspan:3,align:'center'}] ,
                  [
                  {field:'unemployed',title:'小计',width:100,rowspan:2,align:'center'},
                  {field:'priorYear',title:'上年结转',width:100,rowspan:2,align:'center'},    
                  {title:'本年增加',colspan:2,align:'center'},
                  {title:'个人原因减少',colspan:3,align:'center'}],
                  [  
                  {field:'totalYear',title:'小计',width:100,align:'center'},    
                  {field:'totalMonth',title:'本月新增',width:100,align:'center'},
                  {field:'reduceSummary',title:'小计',width:100,align:'center'},    
                  {field:'objReason',title:'因客观原因',width:100,align:'center'},
                  {field:'giveupJob',title:'放弃求职',width:100,align:'center'}
                ]]
    	
    }); 
}
/**
 * 失业人员社区汇总信息excel导出
 */
function exportUnemployedCommunityList(){
	
	window.location.href ="collect/excel/exportUnemployedCommunityList?communityName=" + communityName;

}